package net.pws.common.util;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class CollectionUtils extends
                            org.apache.commons.collections.CollectionUtils {
    
    @SuppressWarnings("rawtypes")
	public static boolean isEmpty(Collection collection) {
        return (collection == null) || (collection.size() == 0);
    }
    
    public static <T, S extends T> List<T> asList (S[] array, Class<T> clazz) {
    	List<T> list = new ArrayList<T>();
    	if (array == null || array.length == 0) {
    		return list;
    	}
    	
    	for (S s: array) {
    		list.add(s);
    	}
    	
    	return list;
    }
}
